home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
CUGUK
/
PROG_TOO
/
C013.ZIP
/
GETS.C
< prev
next >
Wrap
Text File
|
1990-01-19
|
1KB
|
51 lines
/********************************************************************
* C Users Group (U.K) C Source Code Library File CUGLIB.013 *
* Inquiries to: M. Houston, 36 Whetstone Clo. Farquhar Rd. *
* Edgbaston, Birmingham B15 2QN ENGLAND *
********************************************************************
* File name: gets.c
* Program name:gets
* Source of file: Ron Wellstead
* Purpose: An MS-DOS copy of the UNIX utility of the same name.
* Changes: <who what when & why major changes have been made>
********************************************************************/
/*
*
* @(#) gets.c 1.2 87/07/27
*
* UNIX style gets utility for dos
*
* copyright (c) 1987 Ron Wellsted.
* This software is provided on the understanding that it is
* NOT to be used for commercial gain. It may be freely distributed
* in source or object form among amateur and hobby computer users ONLY!
*
* copies a line of text from stdin (or command line) to stdout
* usage: gets [line....]
* written for Microsoft C, link with setargv.obj to expand wildcards
*/
#include <stdio.h>
char string[1024]="@(#) gets.c VR 1.0.0 15 Jul 1987";
main(argc,argv)
int argc;
char **argv;
{
long start_time=0L,finish_time=0L;
char ch;
if (argc<2)
gets(string);
else {
string[0]='\0';
while (--argc>0) {
strcat(string,*++argv);
strcat(string," ");
}
}
puts(string);
}